The present disclosure relates to database query optimization, and more specifically, to using metadata to mark queries delayable.
A huge variety of applications interact with database management systems (DBMS) in order to achieve their goals. One very common way to interact with a DBMS is using structured query language (SQL) to send queries to the database system. Frequently, these queries are parsed and passed to an optimizer which determines how to best execute the query. These query optimizers usually search for a “good enough” query plan which is the plan that will execute the fastest of all possible plans it considers. Frequently, especially with complex queries, the selected query plan may not be the absolute fastest option, but it would take excessive resources and time to continue to search through the vast number of potential plans, and a query that is “fast enough” is acceptable.